package com.common.BearMethods;

import com.common.cons.Constans;
import com.common.retrofit.base.BaseMethods;
import com.common.utils.SortUtils;

import rx.Observable;
import rx.Subscriber;

public class MemberInfoModifyMethods extends BaseMethods {

    private static MemberInfoModifyMethods m_ins = null;

    public static MemberInfoModifyMethods getInstance() {
        if (m_ins == null) {
            synchronized (MemberInfoModifyMethods.class) {
                if (m_ins == null) {
                    m_ins = new MemberInfoModifyMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "api/Shop/";
    }

    private BearService initService() {
        return getRetrofit().create(BearService.class);
    }


    public void editVipUser(Subscriber<Object> subscriber,
                            String uid,
                            String hashid,
                            String vipcardid,
                            String deptcode,
                            String customer_identity_ids,
                            String birthday,
                            String occupation,
                            String idcard,
                            String home_address,
                            String company_name,
                            String faith,
                            String family_festival,
                            String remarks,
                            String education,
                            String language,
                            String vehicle,
                            String like_topic,
                            String taboo_topic,
                            String like_smoke,
                            String food_preference,
                            String family_information,
                            String height,
                            String figure,
                            String complexion,
                            String jacket_size,
                            String pants_size,
                            String shoes_size,
                            String pants_length,
                            String like_color,
                            String like_brand,
                            String waistline,
                            String circumference,
                            String consultant,
                            String return_date
    ) {
        String time = System.currentTimeMillis() + "";
        Observable observable = initService().editVipUser(time,
                SortUtils.getMyHash("time" + time, "uid" + uid, "hashid" + hashid
                        , "vipcardid" + vipcardid,
                        "deptcode" + deptcode,
                        "customer_identity_ids" + customer_identity_ids,
                        "birthday" + birthday,
                        "occupation" + occupation,
                        "idcard" + idcard,
                        "home_address" + home_address,
                        "company_name" + company_name,
                        "faith" + faith,
                        "family_festival" + family_festival,
                        "remarks" + remarks,
                        "education" + education,
                        "language" + language,
                        "vehicle" + vehicle,
                        "like_topic" + like_topic,
                        "taboo_topic" + taboo_topic,
                        "like_smoke" + like_smoke,
                        "food_preference" + food_preference,
                        "family_information" + family_information,
                        "height" + height,
                        "figure" + figure,
                        "complexion" + complexion,
                        "jacket_size" + jacket_size,
                        "pants_size" + pants_size,
                        "shoes_size" + shoes_size,
                        "pants_length" + pants_length,
                        "like_color" + like_color,
                        "like_brand" + like_brand,
                        "waistline" + waistline,
                        "circumference" + circumference,
                        "consultant" + consultant,
                        "return_date" + return_date
                ), Constans.ANDROID_APP_ID, "3",
                uid, hashid, vipcardid	           ,
                deptcode	           ,
                customer_identity_ids,
                birthday	           ,
                occupation	       ,
                idcard	           ,
                home_address	       ,
                company_name	       ,
                faith	               ,
                family_festival	   ,
                remarks	           ,
                education	           ,
                language	           ,
                vehicle	           ,
                like_topic	       ,
                taboo_topic          ,
                like_smoke	       ,
                food_preference	   ,
                family_information   ,
                height	           ,
                figure	           ,
                complexion	       ,
                jacket_size	       ,
                pants_size	       ,
                shoes_size	       ,
                pants_length	       ,
                like_color	       ,
                like_brand	       ,
                waistline	           ,
                circumference	       ,
                consultant	       ,
                return_date
        );
        toSubscribe(observable, subscriber);
    }
}
